package com.uchedao.seller.ui.user;

import android.view.View;

import com.uchedao.seller.R;
import com.uchedao.seller.ui.baidu.BaseFragForBaidu;
import com.uchedao.seller.ui.user.login.PassWordLoginFragment;

/**
 * 登录界面
 * Created by zhengxizhen on 15/10/19.
 */
public class LoginFragment extends BaseFragForBaidu implements View.OnClickListener {

    private static BaseFragForBaidu mInstance = null;

    /**
     * 获取单例
     */
    public static synchronized BaseFragForBaidu getInstance() {
        if (mInstance == null) {
            mInstance = new LoginFragment();
        }
        return mInstance;
    }

    @Override
    protected String getActivityTag() {
        return "LoginFragment";
    }

    @Override
    public int getViewLayoutId() {
        return R.layout.fragment_login;
    }

    @Override
    public void initView() {
        findViewById(R.id.btn_login).setOnClickListener(this);
        findViewById(R.id.btn_register).setOnClickListener(this);
        findViewById(R.id.tv_login_tab_1).setOnClickListener(this);
        findViewById(R.id.tv_login_tab_2).setOnClickListener(this);
        findViewById(R.id.tv_login_tab_3).setOnClickListener(this);
        findViewById(R.id.tv_login_tab_4).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_login:
                toFragment(PassWordLoginFragment.getInstance(), true, true);
                break;
            case R.id.btn_register:
                toFragment(RegisterFragment.getInstance(), true, true);
                break;
            case R.id.tv_login_tab_1:
                break;
            case R.id.tv_login_tab_2:
                break;
            case R.id.tv_login_tab_3:
                break;
            case R.id.tv_login_tab_4:
                break;
        }
    }

    @Override
    public void initListener() {

    }

    @Override
    public void initData() {

    }
}
